package com.nacrtstudio.webgiftshop.model.shop.beans;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

import com.nacrtstudio.webgiftshop.core.beans.BaseBean;
import com.nacrtstudio.webgiftshop.model.shop.Address;
import com.nacrtstudio.webgiftshop.model.shop.PackedGift;
import com.nacrtstudio.webgiftshop.model.shop.User;
import com.nacrtstudio.webgiftshop.util.shop.Country;
import com.nacrtstudio.webgiftshop.util.shop.SerbiaTowns;

@Entity
public class AddressBean extends BaseBean implements Address {
	private Long addressId;
	private String street;
	private SerbiaTowns town;
	private Country country;
	private User user;
	private PackedGift packedGift;
	
	public Long getAddressId() {
		return addressId;
	}
	public void setAddressId(Long addressId) {
		this.addressId = addressId;
	}
	public String getStreet() {
		return street;
	}
	public void setStreet(String street) {
		this.street = street;
	}
	public Country getCountry() {
		return country;
	}
	public void setCountry(Country country) {
		this.country = country;
	}
	@OneToOne(targetEntity=UserBean.class)
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@ManyToOne(targetEntity=PackedGiftBean.class)
	public PackedGift getPackedGift() {
		return packedGift;
	}
	public void setPackedGift(PackedGift packedGift) {
		this.packedGift = packedGift;
	}
	public SerbiaTowns getTown() {
		return town;
	}
	public void setTown(SerbiaTowns town) {
		this.town = town;
	}
	
}
